package com.teamwork.module03.controller;

import com.teamwork.common.result.Result;
import com.teamwork.module03.service.AuthorService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/author")
public class AuthorController {

    @Resource
    private AuthorService authorService;

    @GetMapping("/getbyartid/{artid}")
    public Result getByArtId(@PathVariable("artid")Integer artid){
        return authorService.getByArtId(artid);
    }



}
